/************************************
 * created by Tonk (tonk@ctonk.com) *
 ************************************/

// reset.cpp

#include "definitions.h"
#include "reset.h"

int Reset::numResets = 0;

Reset::Reset() {
	_vnum = 0;
	_type = 0;
	_target = 0;
	_number = 0;
	_limit = 0;
	numResets++;
}

Reset::Reset( Reset& it ) {
	_vnum = it.getVnum();
	_type = it.getType();
	_target = it.getTarget();
	_number = it.getNumber();
	_limit = it.getLimit();
}

Reset::~Reset() {
	numResets--;
}

Reset& Reset::operator = ( Reset& it ) {
	_vnum = it.getVnum();
	_type = it.getType();
	_target = it.getTarget();
	_number = it.getNumber();
	_limit = it.getLimit();
	return *this;
}

void Reset::setVnum( int vnum ) {
	_vnum = vnum;
	return;
}

int Reset::getVnum() {
	return _vnum;
}

void Reset::setType( int type ) {
	_type = type;
	return;
}

int Reset::getType() {
	return _type;
}

void Reset::setTarget( int target ) {
	_target = target;
	return;
}

int Reset::getTarget() {
	return _target;
}

void Reset::setNumber( int number ) {
	_number = number;
	return;
}

int Reset::getNumber() {
	return _number;
}

void Reset::setLimit( int limit ) {
	_limit = limit;
	return;
}

int Reset::getLimit() {
	return _limit;
}

void Reset::Save( std::ofstream& save ) {
	save << "\n**RESET\n" << _vnum << ' ' << _type << ' ' << _target << ' ' << _number << ' ' << _limit << '\n';
	return;
}

void Reset::Load( std::ifstream& load ) {
	load >> _vnum >> _type >> _target >> _number >> _limit;
	return;
}

char Reset::charType() {
	if ( _type == MOB )
		return 'M';
	if ( _type == OBJECT )
		return 'O';
	return '-';
}
